Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update numpy and fix numpy records #117

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

feixie
Copy link
Contributor

@feixie feixie commented Sep 29, 2023

Thanks for contributing! Please remove any top-level sections that do not apply to your changes.

  • make format && make documentation has been run.

New variable

  • Label field added
  • Documentation field added
  • Unit field added
  • Default value field added if relevant
  • Variable name follows conventions
  • Unit test(s) added
  • Integration test(s) added if relevant
  • Issues this PR fixes linked

What's changed

Bumped numpy version to match what's in openfisca-core. Bring in changes from openfisca-core to fix TypeError: ufunc 'isnan' not supported for the input types

Bug fix

  • Regression test added
  • Regression test passing

What this fixes and how it's fixed

Fixes this issue: PolicyEngine/policyengine-us#2802

@MaxGhenis
Copy link
Contributor

Could you try make format, and populate changelog_entry.yaml instead of changelog.yaml?

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (ffcf4a5) 83.69% compared to head (ddc09af) 83.69%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #117   +/-   ##
=======================================
  Coverage   83.69%   83.69%           
=======================================
  Files         182      182           
  Lines        8711     8711           
  Branches     1082     1082           
=======================================
  Hits         7291     7291           
  Misses       1176     1176           
  Partials      244      244           
Files Coverage Δ
policyengine_core/parameters/helpers.py 80.43% <100.00%> (ø)
.../parameters/vectorial_parameter_node_at_instant.py 79.41% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@feixie
Copy link
Contributor Author

feixie commented Sep 29, 2023

Could you try make format, and populate changelog_entry.yaml instead of changelog.yaml?

Fixed

Copy link
Contributor

@MaxGhenis MaxGhenis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Fei! LGTM, just requesting a review from Nikhil.

Copy link
Contributor

@nikhilwoodruff nikhilwoodruff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK to merge since the numpy update is obviously a massive plus- just curious about the sorted usage but I doubt it adds that big a time cost. Thanks @feixie!

@@ -23,7 +23,7 @@ def build_from_node(
node: "ParameterNode",
) -> "VectorialParameterNodeAtInstant":
VectorialParameterNodeAtInstant.check_node_vectorisable(node)
subnodes_name = node._children.keys()
subnodes_name = sorted(node._children.keys())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry just remind me why this is necessary? Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got this change from this commit: openfisca/openfisca-core@c0782fa
Without it I get the TypeError on unit test runs.

@MaxGhenis MaxGhenis mentioned this pull request Oct 2, 2023
11 tasks
@nikhilwoodruff nikhilwoodruff merged commit be82476 into PolicyEngine:master Oct 4, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants